#include <stdio.h>
int main()
{
    int m, n;
    double sum = 0;
    scanf("%d%d", &m, &n);
    for (int i = m; i <= n; i++)
    {
        sum += 1.0 / i + i * i;
    }
    printf("sum = %.6f", sum);
    return 0;
}